<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			function js(){
				var num1=prompt("请输入数字1","");
				var num2=prompt("请输入数字2","");
				var fh=prompt("请输入计算方法","");
				var n1=parseInt(num1);
				var n2=parseInt(num2);
		if(fh=="+"){
			alert(n1+n2);
		}
			if(fh=="-"){
			alert(n1-n2);
		}
				if(fh=="*"){
			alert(n1*n2);
		}
					if(fh=="/"){
			alert(n1/n2);
		}
			
			}
			
		</script>>
	</head>
	<body>
		<input name="f" type="button" value="计算两数运算结果" onclick="js()">
	</body>
</html>
